class P847_39643_Precalc {

	static String readLn() {
		String newLine = System.getProperty("line.separator");
		StringBuffer buffer = new StringBuffer();
		int car = -1;
		try {
			car = System.in.read();
			while ((car > 0) && (car != newLine.charAt(0))) {
				buffer.append((char) car);
				car = System.in.read();
			}
			if (car == newLine.charAt(0))
				System.in.skip(newLine.length() - 1);
		} catch (java.io.IOException e) {
			return (null);
		}
		if ((car < 0) && (buffer.length() == 0))
			return (null);
		return (buffer.toString()).trim();
	}

	public static void main(String[] args) {

		long l = 1;
		boolean b = false;

		while (l <= 4294967295L) {

			if (!b)
				l *= 9;
			else
				l *= 2;

			System.out.print("if (number <= ");
			System.out.println(l + ")");
			if (!b)
				System.out.println("  System.out.println(\"Stan wins.\");");
			else
				System.out.println("  System.out.println(\"Ollie wins.\");");

			b = !b;

		}

	}

}

class P847_39643 {

	static String readLn() {
		String newLine = System.getProperty("line.separator");
		StringBuffer buffer = new StringBuffer();
		int car = -1;
		try {
			car = System.in.read();
			while ((car > 0) && (car != newLine.charAt(0))) {
				buffer.append((char) car);
				car = System.in.read();
			}
			if (car == newLine.charAt(0))
				System.in.skip(newLine.length() - 1);
		} catch (java.io.IOException e) {
			return (null);
		}
		if ((car < 0) && (buffer.length() == 0))
			return (null);
		return (buffer.toString()).trim();
	}

	public static void main(String[] args) {
		String line = readLn();
		
		while (line != null) {
			process(Integer.parseInt(line));
			
			line = readLn();
		}
	}
	
	public static void process(int number) {

		if (number <= 9)
			System.out.println("Stan wins.");
		else if (number <= 18)
			System.out.println("Ollie wins.");
		else if (number <= 162)
			System.out.println("Stan wins.");
		else if (number <= 324)
			System.out.println("Ollie wins.");
		else if (number <= 2916)
			System.out.println("Stan wins.");
		else if (number <= 5832)
			System.out.println("Ollie wins.");
		else if (number <= 52488)
			System.out.println("Stan wins.");
		else if (number <= 104976)
			System.out.println("Ollie wins.");
		else if (number <= 944784)
			System.out.println("Stan wins.");
		else if (number <= 1889568)
			System.out.println("Ollie wins.");
		else if (number <= 17006112)
			System.out.println("Stan wins.");
		else if (number <= 34012224)
			System.out.println("Ollie wins.");
		else if (number <= 306110016)
			System.out.println("Stan wins.");
		else if (number <= 612220032)
			System.out.println("Ollie wins.");
		else if (number <= 5509980288L)
			System.out.println("Stan wins.");

	}
}
